# 封装被测试系统接口
# 定义接口类
import requests
from interfaceDatabase import app
class LoginAPI(object):

    # 初始化
    def __init__(self):
        self.url_login = app.URL+ "/api/sys/login"
    # 登录接口
    def login(self,username,password):
        json = {"mobile":username,"password":password}
        return requests.post(url=self.url_login, json=json)

if __name__ == '__main__':
    result=LoginAPI().login("13800000002","123456")
    print(result.json())